//
// Created by Administrator on 2025/4/20.
//

#ifndef TEST_CONNECTION_H
#define TEST_CONNECTION_H
#include <mysql/mysql.h>
#include <ctime>

class Connection {
public:
    Connection();
    ~Connection();
    bool connect(const char * host, const char * username, const char * password, const char * db,unsigned int port);
    bool update(const char * sql);
    MYSQL_RES * query(const char * sql);
    /*
    void refreshActiveTime();
    clock_t getActiveTime() const;
     * */
private:
    MYSQL m_conn;
    // clock_t m_activeTime;
};


#endif //TEST_CONNECTION_H
